﻿using System;
using System.Collections;
using System.Linq;
using System.Linq.Expressions;

namespace OnLineExam.Web.mag.Handler
{
    public class DataGrid
    {
        public int total;
        public IEnumerable rows;

        public DataGrid(int recordCount, IEnumerable items)
        {
            this.total = recordCount;
            this.rows = items;
        }
        
    }

    public  static class DataGridExtension
    {
        public static DataGrid GetRespone<T>( int page,int pageSize, Expression<Func<T, bool>> order, IQueryable<T> query) {
            var re = new DataGrid(query.Count(), query.ToList());
            return re; 
        }

       
    }
}